<?=modules::run("website/big_images/single_product",$item['id_Products']);?>  

<script type="text/javascript">
function swapImage(new_image) {

    // turn this into jQuery

    //if(fx){fx.stop();}  

    fx = $('prodImage').effects({duration: 200});    
    
    fx.start({
        'opacity':0
    }).chain(function(){

        var myImages = new Asset.images([new_image], {
          onComplete: function(){
            $('prodImage').setProperty('src', new_image);
            fx.start({
                'opacity':1
            });
          }
        });

    });   
}

jQuery(document).ready(function(jQuery) {

	// OVERLAY - opens trigger's href in overlay
	jQuery("a[rel=overlay]").click(function(){
		url = jQuery(this).attr("href");
		jQuery("#overlay").overlay({
			expose: '#fff',   
			onBeforeLoad: function() { 
				var wrap = this.getContent().find(".overlay_container"); 
				wrap.html("Loading...");
				wrap.load(url); 
			}, 
			api: true 
		}).load(); 
		return false;
	});
	
});
</script>


    
  <div id="content-wrap">
  <div class="inner">

    <div class="left">

        <?=modules::run("website/product_search/quick_search");?>   
                                                                                           
        <?
        if ($item["id_Categories"] == ONE_OFF_CAT_ID)
            print modules::run("subnavigation/submenu/products_one_off", $item['id_Products']);
        else if($item["Parent_Categories"] != "")
            print modules::run("subnavigation/submenu/products_by_subcategory", $item['id_Categories'], $item['id_Products']);
        else  
            print modules::run("subnavigation/submenu/products_by_category", $item['id_Categories'], $item['id_Products']);
        ?>                                                          

        <?=modules::run("website/product_search/recent_searches");?>    

    </div>


    
    <div class="right">
                                       
    <? // Breadcrumbs            
    $breadcrumbs[] = array('display' => 'products', 'controller' => 'products', 'title' => 'Products');
    if ($item['id_Categories'] !== ONE_OFF_CAT_ID){
        $breadcrumbs[] = array('display' => 'products by category', 'controller' => 'products/categories', 'title' => 'Products by Category');
        if (isset($item['parent'])) 
                $breadcrumbs[] = array('display' => strtolower($item['parent']['id_Categories']), 'controller' => 'products/categories/'.$item['parent']['id_Categories'], 'title' => ucwords($item['parent']['Title_Categories']));
    }
    $breadcrumbs[] = array('display' => strtolower($item['Title_Categories']), 'controller' => 'products/categories/'.$item['id_Categories'], 'title' => ucwords($item['Title_Categories']));
    $breadcrumbs[] = array('display' => strtolower($item['Name_Products']));

    print modules::run("subnavigation/breadcrumb/view", $breadcrumbs);
    ?>                            


     <h1><?=$item['Name_Products']?></h1>
        
        <h4><?=$item['Introduction_Products']?></h4>

        <div class="sansserif"><?=$this->glossarymodel->link_glossary_terms($item['Description_Products'])?></div>


     <div class="productcontainer">
        <div class="productmain">
          <img id="prodImage" height="385" border="0" width="589" alt="" src="<?=base_url().UPLOADS_FOLDER.PRODUCT_IMG_FOLDER.$item['Main_Image']?>"/>          
        </div>

        <? if (!empty($item['images'])){ ?>
        <div class="productcontainer">

            <div class="productthumb">
                <a href="#" onclick="swapImage('<?=base_url().UPLOADS_FOLDER.PRODUCT_IMG_FOLDER.$item['Main_Image']?>'); return false;">
                    <img height="66" border="0" width="106" alt="" src="<?=thumbnail(base_url().UPLOADS_FOLDER.PRODUCT_IMG_FOLDER.$item['Main_Image'])?>"/>          
                </a>
            </div>

            <? foreach($item['images'] as $image){?>

            <div class="productthumb">
                <a href="#" onclick="swapImage('<?=base_url().UPLOADS_FOLDER.PRODUCT_IMG_FOLDER.$image?>'); return false;">
                    <img height="66" border="0" width="106" alt="" src="<?=base_url().UPLOADS_FOLDER.PRODUCT_IMG_FOLDER.thumbnail($image)?>"/>          
                </a>
            </div>

            <? } ?>

        </div>
        <? } ?>

     </div>


    <div class="summarycontainer">

        <? if(!empty($item["specifications"])) { ?>
        <div class="containsans">
            <p><strong>Product Specifications:</strong></p>
            <p>
                <? foreach($item["specifications"] as $spec) { ?>
                    <?=$spec['Name_Specs']?>: <?=$spec['Value']?> <?=@$spec['Units']?><br/>
                <? } ?>
            </p>
        </div>
        <? } ?>

        <? if(!empty($item["applications"])) { ?>
        <div class="containsans">
            <p><strong>Product Applications:</strong></p>
            <p>
                <? foreach($item["applications"] as $app) { ?>
                    <a href="<?=site_url('products/applications/'.$app['id_Applications'])?>"><?=$app['Name_Applications']?></a><br/>
                <? } ?>
            </p>
        </div>
        <? } ?>

    </div>


    <div class="summarycontainer">
        <a class="print_button" href="#">
            <img height="36" border="0" width="48" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('print','','<?=base_url()?>assets/website/images/buttons<?=INSTANCE_FILE_SUFFIX ?>/print-left_f2.gif',1)" id="print" class="horizontalbutton" name="print" alt="print" src="<?=base_url()?>assets/website/images/buttons<?=INSTANCE_FILE_SUFFIX ?>/print-left.gif"/>
        </a>
        <script type="text/javascript">  
            $$('.print_button').addEvent('click',function(e){ 
                new Event(e).stop();
                window.print();
            });
        </script>

        <a href="<?=site_url('products/pdf/'.$item['id_Products'])?>">
            <img height="36" border="0" width="60" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('download1','','<?=base_url()?>assets/website/images/buttons<?=INSTANCE_FILE_SUFFIX ?>/download_f2.gif',1)" id="download" class="horizontalbutton" name="download1" alt="download tearsheet" src="<?=base_url()?>assets/website/images/buttons<?=INSTANCE_FILE_SUFFIX ?>/download.gif"/>
        </a>
        <a rel="overlay" href="<?=site_url('wishlist/add/'.$item["id_Products"])?>">
            <img height="36" border="0" width="60" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('add','','<?=base_url()?>assets/website/images/buttons<?=INSTANCE_FILE_SUFFIX ?>/addtowishlist_f2.gif',1)" id="add" class="horizontalbutton" name="add1" alt="add to wish list" src="<?=base_url()?>assets/website/images/buttons<?=INSTANCE_FILE_SUFFIX ?>/addtowishlist.gif"/>
        </a>
        <a rel="overlay" href="<?=site_url('email_colleague/index/products/'.$item["id_Products"])?>">
            <img height="36" border="0" width="60" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('email','','<?=base_url()?>assets/website/images/buttons<?=INSTANCE_FILE_SUFFIX ?>/email_f2.gif',1)" id="email" class="horizontalbutton" name="email" alt="email to collegue" src="<?=base_url()?>assets/website/images/buttons<?=INSTANCE_FILE_SUFFIX ?>/email.gif"/>
        </a>

        
    </div>
                               
    <div class="summarycontainer">

        <div class="headercontain">
            <p>More about <?=$item['Title_Categories']?>:</p>
        </div>

        <p>
            <?=$this->glossarymodel->link_glossary_terms($item['Introduction_Categories'])?>
        </p>

        <div>
            <?=$this->glossarymodel->link_glossary_terms($item['Description_Categories'])?>
        </div>

    </div>                  


    <? if (!empty($rel_products["items"])) { ?>

    <div class="summarycontainer">

        <div class="headercontain">
            <p>People who viewed this product also looked at:</p>
        </div>

        <? 
		$rel_products["img_folder"] = base_url().UPLOADS_FOLDER.PRODUCT_IMG_FOLDER;
		$this->load->view('website/lists/default_items', $rel_products) 
		?>

  </div> 
        
    <? } ?>



<div class="widget">    
    <!-- AddThis Button BEGIN -->
    <a href="http://www.addthis.com/bookmark.php?v=250" onmouseover="return addthis_open(this, '', '[URL]', '[TITLE]')" onmouseout="addthis_close()" onclick="return addthis_sendto()"><img src="http://s7.addthis.com/static/btn/lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0"/></a><script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js?pub=xa-4a360d252cc10889"></script>
    <script type="text/javascript">
    var addthis_exclude = 'email, print';
    </script>
    <!-- AddThis Button END -->
</div>
        
    </div>
  </div>
  </div>
